﻿using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SmartCity.Shared;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;

namespace ParkManagement
{
    /// <summary>
    /// 停车记录控制器
    /// </summary>
    [Authorize]
    [RemoteService]
    [Area("commonManagement")]
    [Route("api/parkManagement/records")]
    public class RecordController : AbpController, IRecordAppService
    {
        private readonly IRecordAppService _recordAppService;

        public RecordController(
            IRecordAppService recordAppService)
        {
            _recordAppService = recordAppService;
        }

        // 分页列表
        [HttpGet]
        [Route("list")]
        public Task<ListResponse<RecordDto>> PagedListAsync(PagedListRequest request, string entryTime, string outTime, string parkName, string plateNumber)
        {
            return _recordAppService.PagedListAsync(request, entryTime, outTime, parkName, plateNumber);
        }
    }
}